<template>
	<div class="pagination">
		<el-pagination v-model:currentPage="data.current" :page-sizes="[10,20,30,40,50]" :page-size="data.size"
			layout="total, sizes, prev, pager, next, jumper" :total="data.total" @size-change="handleSizeChange"
			@current-change="handleCurrentChange">
		</el-pagination>
	</div>
</template>
<script setup>
	import {
		ref,
		// defineEmits,
		defineProps,
		onMounted
	} from 'vue'
	let props = defineProps({
			pagData: {
				type: Object,
				required:true
			}
		}),
		data = ref(props.pagData),
		handleCurrentChange = res => {
			console.log('分页变化', res)
		},
		handleSizeChange = res => {
			console.log('数量变化', res)
		}

	onMounted(() => {
		console.log(data.value)
	})
</script>
<style lang="scss" scoped>
	.pagination {}
</style>
